//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#include <ddk.h>
#include "CKMarshalTst.h"
#include "_kmarshaltstabrg.cpp"
#include "_kmarshaltstuuid.cpp"

CKMarshalTst g_KMarshalTst;

void RelocateClassInfo(CIClassInfo* pInClsInfoData,
                        CIClassInfo * pClsInfo);

EXTERN_C void InitKMarshalTst()
{
    ECode ec = -1;
    CIClassInfo * pKerClassInfo;
    pKerClassInfo = \
           (CIClassInfo *)malloc(*(UInt32*)g_kmarshaltst_classInfo);
    assert(pKerClassInfo);

    RelocateClassInfo(g_kmarshaltst_classInfo, pKerClassInfo);
    ec = RegisterServerClassInfo(pKerClassInfo);
    //kprintf("______RegisterServerClassInfo: kmarshaltst! ec = %x\n", ec);

    ec = DzRegisterService(L"marshaltest2", (IInterface *)&g_KMarshalTst, NULL);
    kprintf("______DzRegisterService: marshaltest2!  ec = %x\n", ec);
}
